import Cookies from 'js-cookie';

const TokenKey = 'NtdToken'

function token(token) {
    if (token === null) {
        Cookies.remove(TokenKey);
    }
    if (token) {
        Cookies.set(TokenKey, token);
    }
    return Cookies.get(TokenKey)
}

export default {
    token
}